package com.vim.common.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 线程池
 */
public class ThreadPool {

    public ExecutorService executorService = null;

    private ThreadPool(){
        executorService= Executors.newFixedThreadPool(20);
    }

    static class ThreadPoolHolder {
        static ThreadPool instance = new ThreadPool();
    }

    public static ThreadPool getInstance() {
        return ThreadPoolHolder.instance;
    }

}
